package com.example.rbacmanage.config;

import com.example.rbacmanage.util.MinioUtils;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class InitConfig implements InitializingBean {
    @Autowired
    private MinioUtils minioUtils;
    @Autowired
    private MinioConfig minioConfig;
    @Override
    public void afterPropertiesSet() throws Exception {
        minioUtils.createBucket(minioConfig.getBucketName());
    }
}
